from ollama import chat, AsyncClient
from config import LLM_SERVER


class OllamaCli():
    def __init__(self):
        self.client = AsyncClient(
            host=LLM_SERVER,
            headers={'x-some-header': 'some-value'}
        )

    async def async_chat(self, messages):
        response = await self.client.chat(model='deepseek-r1:32b', stream=True, messages=messages)
        return response
